package com.briup.controller;/*
 * @Description:
 * @Author: 三岁时很酷
 * @Date: 2024/12/12/09:26
 * @LastEditors: 43144
 * @: 四岁时更酷
 */

import com.briup.result.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

@Api(tags = "Swagger测试")
@RestController
@RequestMapping("/swagger")
public class SwaggerController {
    @ApiOperation(notes = "Swagger测试",value = "test")//api介绍
    @ApiImplicitParams(
            {
                    @ApiImplicitParam(name = "username",value = "用户名",required = true,dataType = "String")
            }
    )
    @GetMapping("hello")
    public String hello(String name){
        System.out.println("in hello");
        return "hello Swagger" + name;
    }

//    @ApiOperation(notes = "id必须存在",value = "根据id删除用户")//api介绍
//    @ApiImplicitParams(
//            {
//                    @ApiImplicitParam(name = "id",value = "用户id",required = true,dataType = "long",paramType = "path")
//            }
//    )
//    @DeleteMapping("/deleteById"/)
//    public Result deleteById(@PathVariable Long id){
//        System.out.println("in deleteById"+id);
//        return Result.success();
//    }

}
